import java.util.Arrays;

/**
 * @description:
 * @author: TanJingyu
 * @create: 2021-12-27 10:00
 **/
public class BubblingSort {
    public static void main(String[] args) {
        Integer[] integers = new Integer[] {5, 7, 3, 4, 90, 67, 28, 1, 8};
        sort(integers);
        System.out.println(Arrays.toString(Arrays.stream(integers).toArray()));

        System.out.println(Integer.BYTES);
    }

    public static void sort(Integer[] integers) {
        int tempt;
        for (int i = 0; i < integers.length; i++) {
            for (int j = 0; j < integers.length - i - 1; j++) {
                if (integers[j] > integers[j + 1]) {
                    tempt = integers[j + 1];
                    integers[j + 1] = integers[j];
                    integers[j] = tempt;
                }
            }
        }
    }

    public String test() {
        return "hello";
    }
}

    